function publishPost(){
	
	
		//获取内容
	var arr = [];
	arr.push(UM.getEditor('myEditor').getContent());
	var content = arr.toString();
	//获取纯文本内容
	var arr2 = [];
	arr2.push(UM.getEditor('myEditor').getContentTxt());
	var txtContent = arr2.toString();
	//获取标题
	var title = document.getElementById("publishTitle");
	var topic = document.getElementById("select"); 
	var topicid = topic.selectedIndex;

	$.ajax({
		url: "post/publishPost",
		type: "POST",
		data: {
			title: title.value,
			txtContent:txtContent,
			content:content,
			topicid:topicid
		}
		,
		success: function (data) {
		 var postID = data['result']['postid'];
		 
			alert("发布成功");
		 window.location.href= "inner_post.html?postid="+postID+"&pageNumber=1";
		}
		,
		error: function (err) {
			console.log(err);
		}
	});
}

